package com.itlaobing.annotation.service.impl;

import com.itlaobing.annotation.dao.AopStudentDao;
import com.itlaobing.annotation.entity.Student;
import com.itlaobing.annotation.service.AopStudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.logging.Logger;

@Service("aopStudentServiceImpl")
public class AopStudentServiceImpl implements AopStudentService {
    private Logger logger = Logger.getLogger( this.getClass().getName() );

    @Autowired
    private AopStudentDao sd;

    @Override
    public void saveStudent(Student s) {
        logger.info( "保存学生" );
        sd.save(s);
    }

    public AopStudentDao getSd() {
        return sd;
    }

    public void setSd(AopStudentDao sd) {
        this.sd = sd;
    }
}
